#include "GY_emailedit.h"
#include<QValidator>
#include <QDebug>
GY_EmailEdit::GY_EmailEdit(QWidget *parent) :
    QLineEdit(parent)
{


    setPlaceholderText(QString::fromLocal8Bit("input email"));
    setValidator(new QRegExpValidator(QRegExp("[a-zA-Z0-9-_]+@[a-zA-Z0-9-_]+\\.[a-zA-Z]+")));
}

GY_EmailEdit::~GY_EmailEdit()
{

}
//*****************************************//
//函数功能:获取邮箱**************************//
//传参:无**********************************//
//返回值:邮箱号****************************//
//***************************************//
QString GY_EmailEdit::getEmail()
{
    return text();
}
